package com.victor.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.victor.dao.ManagerDao;
import com.victor.entity.Manager;
import com.victor.service.ManagerService;

@Service
public class ManagerServiceImpl implements ManagerService {
	@Autowired
	private ManagerDao managerDao;

	@Override
	public boolean loginexistmanager(String m_account) {
		if (managerDao.loginexistmanager(m_account) != null) {
			return true;
		}
		return false;
	}

	@Override
	public Manager loginManager(Manager manager) {
		return managerDao.loginManager(manager);
	}

	@Override
	public boolean updManagerPassword(Manager manager) {
		return managerDao.updManagerPassword(manager) > 0 ? true : false;
	}

	// 通过id查询原密码
	@Override
	public Manager getManagerByid(Integer id) {
		return managerDao.getManagerByid(id);
	}

}
